package main

import (
	"github.com/{{{gitUserId}}}/{{{gitRepoId}}}/handlers"
	"github.com/labstack/echo/v4"
	"github.com/labstack/echo/v4/middleware"
)

func main() {
	e := echo.New()

    //todo: handle the error!
	c, _ := handlers.NewContainer()

	// Middleware
	e.Use(middleware.Logger())
	e.Use(middleware.Recover())

{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}
	// {{nickname}} - {{{summary}}}{{#isDeprecated}} (deprecated){{/isDeprecated}}
	e.{{httpMethod.toUpperCase}}("{{{basePathWithoutHost}}}{{{path}}}", c.{{operationId}})
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}

	// Start server
	e.Logger.Fatal(e.Start(":{{serverPort}}"))
}